package main

import (
	"fmt"
	"time"
)

// 输出顺序 3 2 1，defer 的代码相当于一个栈
func main() {

	defer fmt.Println("1")
	defer fmt.Println("2")
	defer fmt.Println("3")

	time.Sleep(time.Second)
}